import order from '@/api/eims/sales/salesOrderAPI'
import stock from '@/api/eims/stockAPI'
import Mixins from '@/views/mixins'
export default {
  mixins: [Mixins],
  methods: {
    getRequestType (opt) {
      if (opt === 'saveSalesOrder') {
        return order.saveOrderInfoAPI
      } else if (opt === 'updateSalesOrder') {
        return order.updateOrderInfoAPI
      } else if (opt === 'getSalesOrder') {
        return order.getSalesOrderAPI
      } else if (opt === 'saveSalesOrderDetail') {
        return order.saveSalesOrderDetailAPI
      } else if (opt === 'deleteSalesOrderDetail') {
        return order.deleteSalesOrderDetailAPI
      } else if (opt === 'cancelOrder') {
        return order.cancelOrderAPI
      } else if (opt === 'submitOrder') {
        return order.submitOrderAPI
      } else if (opt === 'passOrder') {
        return order.passOrderAPI
      } else if (opt === 'completedOrder') {
        return order.completedOrderAPI
      } else if (opt === 'rejectOrder') {
        return order.rejectOrderAPI
      } else if (opt === 'getOrderProductList') {
        return order.getOrderProductListAPI
      } else if (opt === 'getOrderProductStockList') {
        return order.getOrderProductStockListAPI
      } else if (opt === 'orderProductPreparation') {
        return order.orderProductPreparationStockAPI
      } else if (opt === 'getOrderStockRecordList') {
        return stock.getProductDeliveryByAssociateOrderAPI
      } else if (opt === 'getOrderServiceList') {
        return order.getOrderServiceListAPI
      } else if (opt === 'saveOrderService') {
        return order.saveOrderServiceAPI
      } else if (opt === 'deleteOrderService') {
        return order.deleteOrderServiceAPI
      }
    }
  }
}
